package neu.soft.controller;

import neu.soft.service.impl.OrderInquireServiceImpl;
import neu.soft.vo.PageBean;
import neu.soft.vo.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin
@RequestMapping("/orderInquire")
public class OrderInquireController {
    @Autowired
    private OrderInquireServiceImpl orderInquireService;
    @RequestMapping("/findOrder")
    public ResultBean<PageBean<Map<String,Object>>> findOrder(@RequestBody Map<String, Object> map){
        return orderInquireService.findOrder(map);
    }
    @RequestMapping("/findUndistributedOrder")
    public ResultBean<PageBean<Map<String,Object>>> findUndistributedOrder(@RequestBody Map<String, Object> map){
        return orderInquireService.findUndistributedOrder(map);
    }

    @RequestMapping("/findPrintOrder")
    public ResultBean<Map<String,Object>>findPrintOrder(@RequestBody String orderId){
        return orderInquireService.findPrintOrder(orderId);
    }
    @RequestMapping("/findShopping")
    public ResultBean<List<Map<String,Object>>>findShopping(@RequestBody String orderId){
        return orderInquireService.findShopping(orderId);
    }
    @RequestMapping("/findTransfer")
    public ResultBean<List<Map<String,Object>>>findTransfer(@RequestBody String orderId){
        return orderInquireService.findTransfer(orderId);
    }
}
